//
//  HMRecommendTableViewCell.m
//  subscribe
//
//  Created by 宋轩 on 17/1/1.
//  Copyright © 2017年 song. All rights reserved.
//

#import "HMRecommendTableViewCell.h"

@interface HMRecommendTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *image_urlImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *person_infoLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *countLabel;
@property(assign,nonatomic)NSNumber *tid;


@end

@implementation HMRecommendTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setRecommendModel:(HMRecommendModel *)recommendModel
{
    _recommendModel = recommendModel;
    
    [self.image_urlImageView sd_setImageWithURL:[NSURL URLWithString:recommendModel.image_url] placeholderImage:[UIImage imageNamed:@"empty_placeholder_90x90_"]];
//    self.imageView.layer.cornerRadius = self.imageView.bounds.size.height ;
//    self.imageView.layer.masksToBounds = YES;
    self.nameLabel.text = recommendModel.name;
    self.person_infoLabel.text = recommendModel.person_info;
    self.contentLabel.text = recommendModel.content;
    self.priceLabel.text = recommendModel.price;
    self.countLabel.text = [NSString stringWithFormat:@"%@人订阅", recommendModel.subscribe_count == NULL ? @"0" : recommendModel.subscribe_count];
    self.priceLabel.text = [NSString stringWithFormat:@"%@/%@", recommendModel.price, recommendModel.price_unit];
    self.tid = recommendModel.tid;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
//    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated
{
    
}


@end
